<div class="content_wrapper">
    <div class="container-fluid">
        <div class="row">
            <div class="col-sm-12">
                <aside>
                    <header><i class="fa fa-fw fa-file"></i>弹出某些内容</header>
                    <section>
                        <div class="container-fluid">
                            <div class="row">
                                <div class="col-sm-12">
                                    异步加载内容
                                    <button type="button" class="btn btn-primary J_ajax_content_modal" data-href="./fragment/frag1.html">弹出</button>
                                    <hr/>
                                    弹出本地内容
                                    <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal">弹出</button>
                                </div>
                            </div>
                        </div>
                    </section>
                </aside>
            </div>
            <div class="col-sm-12">
                <aside>
                    <header><i class="fa fa-fw fa-file"></i>询问框</header>
                    <section>
                        <div class="container-fluid">
                            <div class="row">
                                <div class="col-sm-12">
                                    <div class="btn-group">
                                        <button type="button" class="btn btn-primary J_confirm_modal" data-tip="一定要删除？" data-target="../server/ajaxReturn.json">删除</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </section>
                </aside>
            </div>
        </div>
    </div>
</div>

<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                <h4 class="modal-title" id="myModalLabel">Modal title</h4>
            </div>
            <form class="form-horizontal J_ajaxForm" role="form" method="get" action="../server/ajaxReturn.json" data-validate="validate">
                <div class="modal-body">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">新闻标题</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" placeholder="新闻标题" name="title">
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary J_ajaxSubmitBtn">提交</button>
                </div>
            </form>
        </div>
    </div>
</div>

<script>
    function validate($form) {
        var title = $form.find('input[name="title"]');
        if ($.trim(title.val()) == '') {
            return '标题不能为空'
        }

        return true;
    }
</script>